package xdu.lz.stage2_design_pattern.chapter9_threadlocal;

public class ThreadLocalTest1 {
    public static void main(String[] args) {
        //Key是当前线程，V是存放的值，不同线程之间不能互相访问
        ThreadLocal<String> threadLocal = new ThreadLocal<>();
        System.out.println("1-> "+threadLocal.get());
        threadLocal.set("local");
        System.out.println(threadLocal.get());

    }
}
